package com.becca.cake.service.system;

import java.util.Map;

import com.becca.cake.model.system.FunctionDO;

/**
 * 功能管理Service接口
 * @author hejinguo
 * @version $Id: IUserFunctionService.java, v 0.1 2013-12-3 下午01:49:45
 */
public interface IUserFunctionService {
    /**
     * 功能管理中加载全部功能树
     * @author hejinguo
     * @return
     * @throws Exception
     */
    String selectFunctionTreeMenu(String isUnable) throws Exception;

    /**
     * 根据ID查询功能信息
     * @author hejinguo
     * @param id
     * @return
     * @throws Exception
     */
    String selectFunctionDOById(String id) throws Exception;

    /**
     * 添加功能信息
     * @author hejinguo
     * @param functionDO
     * @throws Exception
     */
    void insetFunction(FunctionDO functionDO) throws Exception;

    /**
     * 修改功能信息
     * @author hejinguo
     * @param functionDO
     * @throws Exception
     */
    void updateFunctionById(FunctionDO functionDO) throws Exception;

    /**
     * 根据角色ID查询拥有的功能
     * @author hejinguo
     * @param roleId
     * @return
     * @throws Exception
     */
    String selectOwnFunctionByRoleId(String roleId) throws Exception;

    /**
     * 给角色授权功能
     * @author hejinguo
     * @param map
     * @throws Exception
     */
    void updateGrantRoleFunction(Map<String, Object> map) throws Exception;

    /**
     * 根据员工ID查询功能信息
     * @author hejinguo
     * @param adminId
     * @return
     * @throws Exception
     */
    String selectFunctionByAdminId(String adminId) throws Exception;
}
